import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  base: './',
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
    },
  },
  server: {
    host: "0.0.0.0",
    port: 3000,
    proxy: {
     "/api": {
          target: "http://127.0.0.1:7001",
          // rewrite: (path) => {
          //   const result = path.replace(/^\/api/, "");
          //   return path.replace(/^\/api/, "");
          // },
        },
      '/glb': {
        target: 'http://192.168.1.175:8080',
      },
     
    },
  },

  plugins: [uni()],
});
